react-semaphor 0.1.544 → 0.1.546
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/analytics-protocol/index.js +405 -441
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +100 -76
- package/dist/brand-studio/index.js +5 -5
- package/dist/briefings/index.js +55 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{add-to-dashboard-BuAqfA2Y.js → add-to-dashboard-BQRAAnc3.js} +55 -33
- package/dist/chunks/{analytics-base-schemas-BFAoRlkU.js → analytics-base-schemas-BKs3flFS.js} +2 -2
- package/dist/chunks/{assistant-chat-BNLkCDml.js → assistant-chat-BPXhulAx.js} +2792 -2562
- package/dist/chunks/{bookmark-state-CXw7lZ50.js → bookmark-state-C4vetoa0.js} +7 -8
- package/dist/chunks/column-catalog-BYnochWQ.js +3363 -0
- package/dist/chunks/comparison-window-caption-C2xF-eWw.js +1433 -0
- package/dist/chunks/{context-ClREvqCZ.js → context-BerEBuFR.js} +11 -6
- package/dist/chunks/custom-visual-inputs-CkJW9pBS.js +295 -0
- package/dist/chunks/{dashboard-g5a4DKWq.js → dashboard-C3CoKbGY.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-Be4h-7My.js +3734 -0
- package/dist/chunks/dashboard-controls-bxPrlSyp.js +2307 -0
- package/dist/chunks/{dashboard-json-7qT9jmfL.js → dashboard-json-BrjxIiRt.js} +6 -6
- package/dist/chunks/document-dashboard-inputs-CRVHpIHp.js +3010 -0
- package/dist/chunks/{edit-dashboard-visual-BfJwnRIZ.js → edit-dashboard-visual-DYYYDjY6.js} +5986 -6063
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-Ddf55Ku1.js} +8 -8
- package/dist/chunks/global-date-filter-utils-9d6m9-FE.js +11859 -0
- package/dist/chunks/index-CtoK1Lgu.js +586 -0
- package/dist/chunks/{index-DkAyQvC6.js → index-DkQkMKa1.js} +385 -339
- package/dist/chunks/list-filter-DsaTbM3J.js +15 -0
- package/dist/chunks/matrix-analytical-definition-B9vW-osb.js +717 -0
- package/dist/chunks/{matrix-card-DjwWcCo8.js → matrix-card-LiMEipvq.js} +3 -3
- package/dist/chunks/{matrix-formatter-CxJLkztA.js → matrix-formatter-DWEeC0_c.js} +55 -55
- package/dist/chunks/{matrix-member-presentation-CQGdVks6.js → matrix-member-presentation-DqzG-UhQ.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-8OIO4gob.js → matrix-operation-contract-D6vYkZK4.js} +72 -72
- package/dist/chunks/{metric-comparison-DEwi9uc2.js → metric-comparison-zpGw4lD6.js} +2 -2
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
- package/dist/chunks/{pivot-header-presentation-DHcx1XGQ.js → pivot-header-presentation-CQnIDtUv.js} +1 -1
- package/dist/chunks/{pivot-result-identity-DJhXXcns.js → pivot-result-identity-C-Q1j1Wb.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DM4CyGKs.js → pivot-result-lifecycle-pwq3b7LC.js} +571 -380
- package/dist/chunks/{raw-temporal-contract-C51YG48G.js → raw-temporal-contract-WuXA8jBP.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-CLiVi90c.js → raw-temporal-presentation-CBzrDOjM.js} +8 -8
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-Df7VpRVW.js → report-preferences-dialog-4QEZWe5U.js} +637 -610
- package/dist/chunks/{report-runtime-context-Dq8XyODK.js → report-runtime-context-hWiTCzFV.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-UpK_LBpL.js +5677 -0
- package/dist/chunks/{saved-dashboard-context-B-mQ--nV.js → saved-dashboard-context-D_I3Lxk0.js} +184 -212
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{selection-reducer-Dj_8xD69.js → selection-reducer-CJzkTZio.js} +15 -15
- package/dist/chunks/{semaphor-ready-indicator-DDAxk8us.js → semaphor-ready-indicator-4zpRHE-X.js} +56832 -59068
- package/dist/chunks/{shelf-drop-preview-context-BSRPwaED.js → shelf-drop-preview-context-Cfw7TRAx.js} +890 -871
- package/dist/chunks/{source-entity-resolution-BYn9giz3.js → source-entity-resolution-BIGRvtbG.js} +13 -13
- package/dist/chunks/{switch-C3jLxlG0.js → switch-CEBOR4n7.js} +47 -48
- package/dist/chunks/{table-export-sheet-CPfGAQ9X.js → table-export-sheet-4X9mAG3V.js} +1 -1
- package/dist/chunks/table-settings-CunhoDUi.js +605 -0
- package/dist/chunks/{temporal-bucket-D7NBrrtL.js → temporal-bucket-CQOSbv9-.js} +26 -26
- package/dist/chunks/{token-types-DBbZVQsm.js → token-types-BMqRmT-C.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BxzFviM-.js → use-create-flow-overlay-state-DZBZiiD-.js} +83 -83
- package/dist/chunks/{validators-DMHTpf7a.js → validators-C-aOQlTB.js} +713 -658
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1800 -1135
- package/dist/data-app-sdk/index.js +6 -6
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +14 -14
- package/dist/format-utils/index.js +198 -187
- package/dist/index.js +359 -325
- package/dist/layouts/index.js +5 -242
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/shared/index.js +4 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- 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/index.d.ts +2 -0
- package/dist/types/components/surfboard/arrange-layout-button.d.ts +8 -0
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/components/surfboard/screen-size-preview-button.d.ts +7 -0
- package/dist/types/index.js +6 -6
- package/dist/types/lib/charts/table-chart-types.d.ts +4 -0
- package/dist/types/lib/charts/types.d.ts +2 -2
- 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 +41 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +201 -0
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +15 -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/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-editor.d.ts +52 -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/query-context/dashboard-filter-mapping-resolution.d.ts +69 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +159 -56
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +29 -6
- package/dist/types/lib/types/explorer-types.d.ts +10 -0
- package/dist/types/lib/types/semantic-types.d.ts +84 -0
- package/dist/types/lib/utils/build-saved-editor-card.d.ts +20 -0
- package/dist/types/lib/utils/card-type-change.d.ts +16 -0
- package/dist/types/lib/utils/field-availability-context.d.ts +25 -0
- package/dist/types/lib/utils/field-placement.d.ts +96 -0
- package/dist/types/lib/utils/field-state-calculator.d.ts +161 -0
- package/dist/types/lib/utils/qualified-entity-name.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/field-provenance.d.ts +89 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/query-policies.d.ts +52 -0
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/time-window.d.ts +40 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -12
- package/dist/types/shared/assistant-protocol/answer-text.d.ts +20 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +21 -21
- package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +6 -1
- package/dist/types/shared/assistant-protocol/parts.d.ts +43 -3
- package/dist/types/shared/assistant-protocol/request.d.ts +14 -2
- package/dist/types/shared/dashboard-authoring/calculated-field-identity.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +487 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +34 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +7886 -0
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +43 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +54 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +89 -0
- package/dist/types/shared/dashboard-authoring/column-catalog.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -55
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -6
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +9 -1
- 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 +118 -0
- package/dist/types/shared/dashboard-authoring/filter-applicability.d.ts +75 -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 +20 -2
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +10 -37
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +189 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +94 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/validators.d.ts +1 -2
- 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/dist/types/shared/layouts/engine/grid.d.ts +25 -0
- package/dist/types/shared/layouts/engine/index.d.ts +4 -0
- package/dist/types/shared/layouts/engine/sheet-layout.d.ts +7 -0
- package/dist/types/shared/layouts/engine/types.d.ts +125 -0
- package/dist/types/shared/layouts/index.d.ts +1 -2
- package/package.json +2 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/apply-dashboard-operations-Bz4n1Lq6.js +0 -2260
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/comparison-window-caption-BTkrN3W4.js +0 -1623
- package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +0 -323
- package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +0 -3725
- package/dist/chunks/dashboard-controls-8RyBTQUO.js +0 -2315
- package/dist/chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js +0 -108
- package/dist/chunks/document-dashboard-inputs-BC6p-ESg.js +0 -8087
- package/dist/chunks/document-sheet-utils-Duo9uLoH.js +0 -3619
- package/dist/chunks/matrix-analytical-definition-C7Gb0e12.js +0 -117
- package/dist/chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js +0 -67
- package/dist/chunks/numeric-presentation-DESvLiu9.js +0 -5227
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/chunks/stable-serialize-CfqXeiBP.js +0 -6
- package/dist/chunks/table-settings-CLZocegs.js +0 -501
- package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +0 -59
- 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/shared/dashboard-authoring/change-compiler.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/layout-compiler.d.ts +0 -2
- package/dist/types/shared/layouts/create-frame-layouts.d.ts +0 -27
- package/dist/types/shared/layouts/frame-layouts.d.ts +0 -23
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
|
+
import { DashboardInput, DashboardInputScope, DashboardInputValues, EmbeddedFilterDashboardInput, TDashboard } from '../types/common-types.js';
|
|
3
|
+
import { GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
|
|
4
|
+
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
5
|
+
import { DashboardFilterMappingContractIssue, DashboardFilterOptionDependencies, DashboardFilterOptionPopulation, DashboardFilterOptionSource } from '../../shared/dashboard-authoring/index.js';
|
|
6
|
+
import { FilterRef } from '../../shared/dashboard-authoring/filter-model/index.js';
|
|
7
|
+
import { DataSource, Field } from '../types/explorer-types.js';
|
|
8
|
+
import { DashboardFilterMappingDraft, DashboardFilterMappingIssue } from './dashboard-filter-mapping-authoring.js';
|
|
9
|
+
import { DashboardInputRuntimeTarget } from './dashboard-input-values.js';
|
|
10
|
+
import { DefaultsCalendar } from '../utils/filter-default-value-utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* Filter settings (one filter model M4, SPEC 4.5): every settings write of a
|
|
13
|
+
* filter input, in one transaction. `applyFilterSettingsChange` is the pure
|
|
14
|
+
* core (the next dashboard, with saved defaults, and the runtime value
|
|
15
|
+
* effects); the store's `saveFilterSettings` applies both in one write with
|
|
16
|
+
* `applyFilterValueEffects`. Every filter is an input that holds its own
|
|
17
|
+
* definition (Phase 5), so there is one storage row: the input and its slots.
|
|
18
|
+
*/
|
|
19
|
+
/** Every authorable setting. `undefined` = unchanged; `null` = remove. */
|
|
20
|
+
export type FilterSettingsChange = {
|
|
21
|
+
/** Column, title, operator, defaults, presentation fields. Reach fields in it are ignored. */
|
|
22
|
+
definition?: TFilter;
|
|
23
|
+
label?: string;
|
|
24
|
+
variableName?: string;
|
|
25
|
+
forceSelection?: boolean;
|
|
26
|
+
requiredAtExecution?: boolean;
|
|
27
|
+
scope?: DashboardInputScope;
|
|
28
|
+
optionSource?: DashboardFilterOptionSource | null;
|
|
29
|
+
optionDependencies?: DashboardFilterOptionDependencies | null;
|
|
30
|
+
optionPopulation?: DashboardFilterOptionPopulation | null;
|
|
31
|
+
/** Save a draft's acceptance, or remove the mapping. */
|
|
32
|
+
mapping?: {
|
|
33
|
+
kind: 'save';
|
|
34
|
+
draft: DashboardFilterMappingDraft;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'remove';
|
|
37
|
+
};
|
|
38
|
+
/** Value effects the author asked for, at one runtime target. */
|
|
39
|
+
values?: {
|
|
40
|
+
/** The default this target loads changed; its runtime slot resets to the default. */
|
|
41
|
+
defaultChanged?: boolean;
|
|
42
|
+
/** Global Date and date filters: the saved comparison selection (`null` removes it). */
|
|
43
|
+
defaultComparisonSelection?: GlobalDateComparisonSelection | null;
|
|
44
|
+
/** The option value field changed; stored selections no longer mean the same values. */
|
|
45
|
+
selectionIdentityChanged?: boolean;
|
|
46
|
+
target: DashboardInputRuntimeTarget;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type FilterSettingsIssue = DashboardFilterMappingIssue | {
|
|
50
|
+
code: 'invalidSettings';
|
|
51
|
+
message: string;
|
|
52
|
+
ref: FilterRef;
|
|
53
|
+
inputId?: string;
|
|
54
|
+
contractIssue?: DashboardFilterMappingContractIssue;
|
|
55
|
+
};
|
|
56
|
+
export type FilterValueEffect = {
|
|
57
|
+
kind: 'resetToDefault';
|
|
58
|
+
inputId: string;
|
|
59
|
+
target: DashboardInputRuntimeTarget;
|
|
60
|
+
filterValue?: TFilterValue;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'clear';
|
|
63
|
+
inputId: string;
|
|
64
|
+
target: DashboardInputRuntimeTarget;
|
|
65
|
+
} | {
|
|
66
|
+
kind: 'setDefaultComparison';
|
|
67
|
+
inputId: string;
|
|
68
|
+
target: DashboardInputRuntimeTarget;
|
|
69
|
+
}
|
|
70
|
+
/** A scope change: drop the live slot of a target the input no longer reaches. */
|
|
71
|
+
| {
|
|
72
|
+
kind: 'dropTargetSlot';
|
|
73
|
+
inputId: string;
|
|
74
|
+
target: DashboardInputRuntimeTarget;
|
|
75
|
+
};
|
|
76
|
+
export type FilterSettingsChangeResult = {
|
|
77
|
+
ok: true;
|
|
78
|
+
dashboard: TDashboard;
|
|
79
|
+
inputId: string;
|
|
80
|
+
valueEffects: FilterValueEffect[];
|
|
81
|
+
} | {
|
|
82
|
+
ok: false;
|
|
83
|
+
issues: FilterSettingsIssue[];
|
|
84
|
+
};
|
|
85
|
+
export type FilterSettingsSaveResult = {
|
|
86
|
+
ok: true;
|
|
87
|
+
inputId: string;
|
|
88
|
+
} | {
|
|
89
|
+
ok: false;
|
|
90
|
+
issues: FilterSettingsIssue[];
|
|
91
|
+
};
|
|
92
|
+
export type FilterSettingsContext = {
|
|
93
|
+
/** The report calendar defaults resolve in; null only before the report context loads. */
|
|
94
|
+
calendar: CalendarContext | null;
|
|
95
|
+
};
|
|
96
|
+
/** The effective forceSelection for a filter (moved unchanged from the authoring policy). */
|
|
97
|
+
export declare function resolveFilterInputForceSelection(requested: boolean | undefined, filter: TFilter | undefined, timezone?: string): true | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* A new filter from a catalog field (SPEC 4.5): one shared value for every
|
|
100
|
+
* target it reaches (OF-D18), its placement derived from the definition
|
|
101
|
+
* (S-7), and a variable name unique against the existing inputs.
|
|
102
|
+
*/
|
|
103
|
+
export declare function buildFilterInputFromField(params: {
|
|
104
|
+
field: Field;
|
|
105
|
+
dataSource?: DataSource | null;
|
|
106
|
+
connectionId?: string;
|
|
107
|
+
connectionType?: string;
|
|
108
|
+
scope: DashboardInputScope;
|
|
109
|
+
existingInputs: readonly DashboardInput[];
|
|
110
|
+
createId?: () => string;
|
|
111
|
+
/** The filter's label (and variable name); default the field's label. */
|
|
112
|
+
label?: string;
|
|
113
|
+
}): EmbeddedFilterDashboardInput;
|
|
114
|
+
/**
|
|
115
|
+
* A new filter input holding this definition (one filter model Phase 5):
|
|
116
|
+
* every new filter, from a catalog field or the toolbar's field picker, or
|
|
117
|
+
* the Global Date. One shared value for every target it reaches (OF-D18), its
|
|
118
|
+
* placement derived from the definition (S-7), a variable name unique against
|
|
119
|
+
* the existing inputs, and no reach fields (reach is the scope).
|
|
120
|
+
*/
|
|
121
|
+
export declare function buildFilterInputFromDefinition(params: {
|
|
122
|
+
filter: TFilter;
|
|
123
|
+
label?: string;
|
|
124
|
+
scope: DashboardInputScope;
|
|
125
|
+
existingInputs: readonly DashboardInput[];
|
|
126
|
+
createId?: () => string;
|
|
127
|
+
}): EmbeddedFilterDashboardInput;
|
|
128
|
+
/** The pure core (SPEC 4.5). Never partially applies. */
|
|
129
|
+
export declare function applyFilterSettingsChange(dashboard: TDashboard, ref: FilterRef, change: FilterSettingsChange, context?: FilterSettingsContext): FilterSettingsChangeResult;
|
|
130
|
+
/**
|
|
131
|
+
* Applies the core's value effects to the store's input values, in the same
|
|
132
|
+
* write as the dashboard (SPEC 4.5 rule 4). `before` is the dashboard the
|
|
133
|
+
* change was made on.
|
|
134
|
+
*/
|
|
135
|
+
export declare function applyFilterValueEffects(params: {
|
|
136
|
+
dashboardInputValues: DashboardInputValues;
|
|
137
|
+
effects: readonly FilterValueEffect[];
|
|
138
|
+
before: TDashboard;
|
|
139
|
+
after: TDashboard;
|
|
140
|
+
calendar: CalendarContext | null;
|
|
141
|
+
}): DashboardInputValues;
|
|
142
|
+
export type DashboardFilterStorageState = {
|
|
143
|
+
dashboardInputValues: DashboardInputValues;
|
|
144
|
+
defaultInputValues?: DashboardInputValues;
|
|
145
|
+
};
|
|
146
|
+
export type DashboardFilterAuthoringSettingsUpdate = {
|
|
147
|
+
forceSelection?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* The caller changed the default its target loads. Filter settings start
|
|
150
|
+
* from the target's saved default (`resolveAuthoredFilterDefaultFields`),
|
|
151
|
+
* which can differ from the definition for a scoped Input or an overlay
|
|
152
|
+
* entry, so they say so; callers that start from the definition leave it
|
|
153
|
+
* unset and the owner compares definitions. Also resets a saved slot that
|
|
154
|
+
* has no backing default.
|
|
155
|
+
*/
|
|
156
|
+
defaultValueChanged?: boolean;
|
|
157
|
+
defaultComparisonChanged?: boolean;
|
|
158
|
+
defaultComparisonSelection?: GlobalDateComparisonSelection;
|
|
159
|
+
target?: DashboardInputRuntimeTarget;
|
|
160
|
+
optionSourceChanged?: boolean;
|
|
161
|
+
optionSource?: DashboardFilterOptionSource;
|
|
162
|
+
/** Authored option dependency policy edit; undefined value restores the
|
|
163
|
+
* dashboard default (omitted, meaning All applicable). */
|
|
164
|
+
optionDependenciesChanged?: boolean;
|
|
165
|
+
optionDependencies?: DashboardFilterOptionDependencies;
|
|
166
|
+
optionPopulationChanged?: boolean;
|
|
167
|
+
optionPopulation?: DashboardFilterOptionPopulation;
|
|
168
|
+
/** Raw selection identity changed; the previous runtime value is invalid. */
|
|
169
|
+
selectionIdentityChanged?: boolean;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Callers submit edits; the owner decides whether defaults must be reseeded.
|
|
173
|
+
* A default change (values, date window or mode) writes the target's saved
|
|
174
|
+
* default and live value; the definition, which the caller submits whole,
|
|
175
|
+
* holds the last authored default.
|
|
176
|
+
*/
|
|
177
|
+
export declare function resolveFilterAuthoringSettings(previous: TFilter | undefined, filter: TFilter, settings: DashboardFilterAuthoringSettingsUpdate | undefined, target: DashboardInputRuntimeTarget, calendar?: DefaultsCalendar): {
|
|
178
|
+
target: DashboardInputRuntimeTarget;
|
|
179
|
+
defaultValueChanged: boolean;
|
|
180
|
+
defaultFilterValue: TFilterValue | undefined;
|
|
181
|
+
forceSelection?: boolean;
|
|
182
|
+
defaultComparisonChanged?: boolean;
|
|
183
|
+
defaultComparisonSelection?: GlobalDateComparisonSelection;
|
|
184
|
+
optionSourceChanged?: boolean;
|
|
185
|
+
optionSource?: DashboardFilterOptionSource;
|
|
186
|
+
optionDependenciesChanged?: boolean;
|
|
187
|
+
optionDependencies?: DashboardFilterOptionDependencies;
|
|
188
|
+
optionPopulationChanged?: boolean;
|
|
189
|
+
optionPopulation?: DashboardFilterOptionPopulation;
|
|
190
|
+
selectionIdentityChanged?: boolean;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Applies Basic-tab default edits to the same storage transaction that changes
|
|
194
|
+
* mapped participation. This keeps the authoritative filter, mapped input, and
|
|
195
|
+
* its runtime/default slots from becoming observable in mixed states.
|
|
196
|
+
*/
|
|
197
|
+
export declare function applyFilterAuthoringSettingsToStorage(params: {
|
|
198
|
+
state: DashboardFilterStorageState;
|
|
199
|
+
input: Pick<DashboardInput, 'id' | 'runtimeScope'>;
|
|
200
|
+
settings?: ReturnType<typeof resolveFilterAuthoringSettings>;
|
|
201
|
+
}): DashboardFilterStorageState;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TDashboard } from '../types/common-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A saved dashboard as it enters a runtime (one filter model SPEC 5.1): the
|
|
4
|
+
* filter model's stored shape, every filter an embedded input, when the
|
|
5
|
+
* model reads it without issues; otherwise the template as received, read
|
|
6
|
+
* tolerantly (rejected inputs left out) and refused on save. Then the
|
|
7
|
+
* Include / Exclude repair. Loading never throws on model issues.
|
|
8
|
+
*
|
|
9
|
+
* The one entry for every runtime: the client load (`useDashboard`), the
|
|
10
|
+
* store's replace and load (`setDashboard`, `setDashboardWithFilterValues`)
|
|
11
|
+
* and the server's saved-dashboard reader, so they all hold the same shape.
|
|
12
|
+
* The same object when nothing changes. Alias-based text is bound to stable
|
|
13
|
+
* input ids before the upgrade (`upgradeToStoredDashboard`, ledger P5-11).
|
|
14
|
+
*/
|
|
15
|
+
export declare function prepareLoadedDashboard<TDashboardShape extends TDashboard>(dashboard: TDashboardShape): TDashboardShape;
|
|
@@ -3,12 +3,17 @@ import { CardViewStateMap } from '../dashboard-view-state/index.js';
|
|
|
3
3
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
4
4
|
import { DashboardInputValues, NormalizedDashboardInput, ResolvedDashboardInput, ResolvedDashboardInputContext, TCard, TDashboard } from '../types/common-types.js';
|
|
5
5
|
import { DashboardInputRuntimeTarget } from './dashboard-input-values.js';
|
|
6
|
-
import { doesDashboardInputApplyToTarget } from '
|
|
6
|
+
import { doesDashboardInputApplyToTarget } from '../../shared/dashboard-authoring/dashboard-input-scope.js';
|
|
7
7
|
import { TransientInputContext } from './transient-input-context.js';
|
|
8
8
|
export { doesDashboardInputApplyToTarget };
|
|
9
9
|
export type DashboardInputRuntimeValues = {
|
|
10
10
|
dashboardInputValues?: DashboardInputValues;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Runtime-only values no filter defines (chart clicks, summary chips; one
|
|
13
|
+
* filter model SPEC 5.8). Input resolution never reads them; authored filter
|
|
14
|
+
* values are slots.
|
|
15
|
+
*/
|
|
16
|
+
adHocFilterValues?: TFilterValue[];
|
|
12
17
|
controlValues?: Record<string, unknown>;
|
|
13
18
|
inlineFilterValuesMap?: Record<string, TFilterValue[] | undefined>;
|
|
14
19
|
cardControlValuesMap?: Record<string, Record<string, unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectionField, SelectionInputValue } from '../../shared/analytics-protocol/selection-contract.js';
|
|
2
2
|
import { DashboardFilterTarget } from '../../shared/dashboard-authoring/index.js';
|
|
3
|
-
import { ScopedDashboardInputTarget } from '
|
|
3
|
+
import { ScopedDashboardInputTarget } from '../../shared/dashboard-authoring/dashboard-input-scope.js';
|
|
4
4
|
import { NormalizedFilterDashboardInput, SelectionDashboardInput, TCard } from '../types/common-types.js';
|
|
5
5
|
import { FilterCondition } from '../types/explorer-types.js';
|
|
6
6
|
export type SelectionSkipReason =
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
|
+
import { DashboardInputExecutionSnapshot, TDashboard } from '../types/common-types.js';
|
|
3
|
+
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
4
|
+
import { CardViewStateMap } from '../dashboard-view-state/index.js';
|
|
5
|
+
import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
|
|
6
|
+
import { ViewerStoreInputValues } from './compatibility-input-storage.js';
|
|
7
|
+
/** The values a card runs with: the store's input values and its view state. */
|
|
8
|
+
export type CardRuntimeValues = ViewerStoreInputValues & {
|
|
9
|
+
cardViewState: CardViewStateMap;
|
|
10
|
+
};
|
|
11
|
+
/** The stored values one capture opens with (a print view state, a Briefing attachment's settings). */
|
|
12
|
+
export type StoredCaptureValues = {
|
|
13
|
+
filterValues?: readonly TFilterValue[];
|
|
14
|
+
controlValues?: Readonly<Record<string, unknown>>;
|
|
15
|
+
/** Already selected by the caller: for a dashboard PDF, the tab's snapshot from `resolvePrintInputs`. */
|
|
16
|
+
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* How a stored capture opens (one filter model SPEC 5.9): a print render, a
|
|
20
|
+
* scheduled card attachment on the server, and, with an empty capture, a
|
|
21
|
+
* fresh viewer (MCP `fromCard`). In order:
|
|
22
|
+
* 1. saved defaults, through hydration (SPEC 5.2);
|
|
23
|
+
* 2. the capture's filter value list as a host overlay (`hostFilterValuesToSlots`);
|
|
24
|
+
* 3. the capture's slot snapshot, replayed exactly (`completeDashboardInputReplacementValues`);
|
|
25
|
+
* 4. the snapshot's drill paths and carried contexts.
|
|
26
|
+
* A listed value whose `filterId` owns no input is an ad-hoc value (SPEC 5.8).
|
|
27
|
+
* The capture crossed storage, so it is read defensively, as before. Control
|
|
28
|
+
* values pass through as overrides; the caller applies the control contract
|
|
29
|
+
* to the dashboard first. Pure and server-safe: the server's
|
|
30
|
+
* `buildSavedCardRequest` calls it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveCapturedRuntimeValues(input: {
|
|
33
|
+
dashboard: TDashboard;
|
|
34
|
+
capture: StoredCaptureValues;
|
|
35
|
+
calendar: CalendarContext | undefined;
|
|
36
|
+
}): {
|
|
37
|
+
runtimeValues: CardRuntimeValues;
|
|
38
|
+
controlOverrides: Readonly<Record<string, unknown>> | undefined;
|
|
39
|
+
transientContexts?: readonly TransientInputContext[];
|
|
40
|
+
};
|
|
@@ -3,15 +3,17 @@ import { DashboardInputCompatibilityMetadata, DashboardInputValues, TDashboard }
|
|
|
3
3
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* The bridge between bookmark slots and the storage compatibility inputs
|
|
6
|
-
* still use (TECH-SPEC 12, ledger P2-08).
|
|
7
|
-
*
|
|
8
|
-
* and
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* file is
|
|
6
|
+
* still use (TECH-SPEC 12, ledger P2-08). Controls and card inline filters
|
|
7
|
+
* keep their values in control values and inline filter values, where the
|
|
8
|
+
* controls and queries read them. Reading turns that storage into slots;
|
|
9
|
+
* writing turns a bookmark's slots back into it. Every dashboard filter keeps
|
|
10
|
+
* its value in a slot (one filter model Phase 4a), so its slots pass through.
|
|
11
|
+
* When controls and inline filters keep their values in slots, this file is
|
|
12
|
+
* deleted.
|
|
12
13
|
*/
|
|
13
14
|
export type ViewerRuntimeInputs = {
|
|
14
|
-
|
|
15
|
+
/** Runtime-only values no filter defines (one filter model SPEC 5.8). */
|
|
16
|
+
readonly adHocFilterValues: readonly TFilterValue[];
|
|
15
17
|
readonly controlOverrides: Readonly<Record<string, unknown>> | undefined;
|
|
16
18
|
readonly dashboardInputValues: DashboardInputValues;
|
|
17
19
|
/** Absent: the cards' inline filter defaults. */
|
|
@@ -19,7 +21,7 @@ export type ViewerRuntimeInputs = {
|
|
|
19
21
|
};
|
|
20
22
|
/** The input values the dashboard store holds, which cards run with. */
|
|
21
23
|
export type ViewerStoreInputValues = {
|
|
22
|
-
|
|
24
|
+
adHocFilterValues: TFilterValue[];
|
|
23
25
|
controlValues: Record<string, unknown>;
|
|
24
26
|
cardControlValuesMap: Record<string, Record<string, unknown>>;
|
|
25
27
|
dashboardInputValues: DashboardInputValues;
|
|
@@ -49,23 +51,21 @@ export declare function materializeViewerInputs(dashboard: TDashboard, runtime:
|
|
|
49
51
|
*/
|
|
50
52
|
export declare function materializeViewerRuntimeInputs(dashboard: TDashboard, runtimeValues: Parameters<typeof materializeRuntimeInputs>[1], calendar: CalendarContext | undefined): DashboardInputValues;
|
|
51
53
|
declare function materializeRuntimeInputs(dashboard: TDashboard, runtimeValues: {
|
|
52
|
-
|
|
54
|
+
adHocFilterValues?: TFilterValue[];
|
|
53
55
|
controlValues?: Record<string, unknown>;
|
|
54
56
|
cardControlValuesMap?: Record<string, Record<string, unknown>>;
|
|
55
57
|
dashboardInputValues?: DashboardInputValues;
|
|
56
58
|
inlineFilterValuesMap?: Record<string, TFilterValue[] | undefined>;
|
|
57
59
|
}, calendar: CalendarContext | undefined): DashboardInputValues;
|
|
58
60
|
/**
|
|
59
|
-
* A bookmark's slots, split by where each value lives.
|
|
60
|
-
* click selections are runtime slots.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* A bookmark's slots, split by where each value lives. Filter inputs (every
|
|
62
|
+
* dashboard filter included) and click selections are runtime slots.
|
|
63
|
+
* Controls and card inline filters keep their values where the controls and
|
|
64
|
+
* queries read them: control values and inline filter values. A comparison
|
|
65
|
+
* choice stays a runtime aspect slot.
|
|
64
66
|
*/
|
|
65
67
|
export type BookmarkInputs = {
|
|
66
68
|
readonly runtime: DashboardInputValues;
|
|
67
|
-
/** filterId -> value, or `null` for a default the viewer removed. */
|
|
68
|
-
readonly filterValues: ReadonlyMap<string, TFilterValue | null>;
|
|
69
69
|
readonly controlValues: Readonly<Record<string, unknown>>;
|
|
70
70
|
/** cardId -> filterId -> value, or `null` for a removed default. */
|
|
71
71
|
readonly inlineFilterValues: ReadonlyMap<string, ReadonlyMap<string, TFilterValue | null>>;
|
|
@@ -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';
|
|
@@ -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";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ContainerId, Field } from '../types/explorer-types.js';
|
|
2
|
+
import { TCard } from '../types/common-types.js';
|
|
3
|
+
import { FieldPlacement, FieldPlacementContext, FieldPlacementOutcome } from '../utils/field-placement.js';
|
|
4
|
+
import { MatrixViewState, MatrixConfig, MatrixSpec } from '../../shared/analytics-protocol/index.js';
|
|
5
|
+
import { MatrixAuthoringChange, MatrixAuthoringNotice } from '../../shared/dashboard-authoring/matrix-authoring.js';
|
|
6
|
+
import { MatrixCardCatalog } from './matrix-card-adapter.js';
|
|
7
|
+
/** Source-panel fields already carry catalog identity; do not infer it from names or SQL. */
|
|
8
|
+
export declare function matrixEditorCatalogFromFields(card: Pick<TCard, 'dataSource'> & {
|
|
9
|
+
config?: {
|
|
10
|
+
matrix?: {
|
|
11
|
+
spec: Pick<MatrixSpec, 'source'>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}, fields: readonly Field[]): MatrixCardCatalog;
|
|
15
|
+
export type MatrixEditorChange = {
|
|
16
|
+
card: TCard;
|
|
17
|
+
notices: readonly MatrixAuthoringNotice[];
|
|
18
|
+
};
|
|
19
|
+
export declare function changeMatrixEditor(card: TCard, config: MatrixConfig, change: MatrixAuthoringChange, catalog: MatrixCardCatalog): MatrixEditorChange;
|
|
20
|
+
/**
|
|
21
|
+
* Copy the live session into the authored config: expansion on both axes
|
|
22
|
+
* becomes defaultView and effective sorts become the authored sorts. This is
|
|
23
|
+
* the one explicit path from exploration to persisted state.
|
|
24
|
+
*/
|
|
25
|
+
export declare function persistMatrixEditorView(card: TCard, config: MatrixConfig, view: MatrixViewState, catalog: MatrixCardCatalog): MatrixEditorChange;
|
|
26
|
+
/** All editor surfaces replace the canonical config and its bindings atomically. */
|
|
27
|
+
export declare function applyMatrixEditorResult(card: TCard, result: {
|
|
28
|
+
config: MatrixConfig;
|
|
29
|
+
bindings: readonly NonNullable<TCard['controlBindings']>[number][];
|
|
30
|
+
notices: readonly MatrixAuthoringNotice[];
|
|
31
|
+
}): MatrixEditorChange;
|
|
32
|
+
/**
|
|
33
|
+
* Field placement for Matrix cards: the field-list entity gate, then the one
|
|
34
|
+
* spec transaction. Side-effect-free; the new instance id is context input.
|
|
35
|
+
* Called through `evaluateFieldPlacement` by both the drop and its preview.
|
|
36
|
+
*/
|
|
37
|
+
export declare function evaluateMatrixPlacement(card: TCard, placement: FieldPlacement, context: FieldPlacementContext): FieldPlacementOutcome;
|
|
38
|
+
/**
|
|
39
|
+
* One atomic mutation for source drops, cross-shelf moves and reordering.
|
|
40
|
+
* A field-list drop creates an instance and needs `newInstanceId`; the
|
|
41
|
+
* committing adapter mints it, so this function reads no random source.
|
|
42
|
+
*/
|
|
43
|
+
export declare function dropMatrixEditorField(card: TCard, catalog: MatrixCardCatalog, input: {
|
|
44
|
+
field: Field;
|
|
45
|
+
from: ContainerId;
|
|
46
|
+
to: ContainerId;
|
|
47
|
+
beforeId?: string;
|
|
48
|
+
newInstanceId?: string;
|
|
49
|
+
}): MatrixEditorChange;
|
|
50
|
+
export declare function removeMatrixEditorField(card: TCard, zone: ContainerId, id: string, catalog: MatrixCardCatalog): MatrixEditorChange;
|
|
51
|
+
/** Scope storage stays with calculated-field transitions; this owns selected Matrix copies. */
|
|
52
|
+
export declare function reconcileMatrixCalculatedField(card: TCard, fields: readonly Field[], previous: Field | undefined, updated?: Field): MatrixEditorChange;
|