react-semaphor 0.1.506 → 0.1.508
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/DATA_APP_SDK.md +56 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +194 -172
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/appearance-runtime/index.cjs +1 -1
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +139 -119
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +3 -3
- package/dist/chunks/appearance-context-DzqCdhB4.cjs +1 -0
- package/dist/chunks/{appearance-context-XviHOhWJ.js → appearance-context-VJdrKi7r.js} +2 -1
- package/dist/chunks/{appearance-runtime-provider-D0xVQWnH.js → appearance-runtime-provider-CC4HT2Gi.js} +2 -2
- package/dist/chunks/{appearance-runtime-provider-Ca8rxO86.cjs → appearance-runtime-provider-D5pkvgE4.cjs} +1 -1
- package/dist/chunks/calculated-field-identity-BiTGmnST.cjs +1 -0
- package/dist/chunks/calculated-field-identity-CJL54uFx.js +1373 -0
- package/dist/chunks/{constants-NUleP4DY.js → card-config-utils-Bq1enstT.js} +260 -260
- package/dist/chunks/card-config-utils-CMO4_zVs.cjs +1 -0
- package/dist/chunks/{dashboard-briefing-launcher-DXTpU85p.js → dashboard-briefing-launcher-B9l0ZAbv.js} +12 -12
- package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-C4zsM3Hd.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-BCQv4xWM.js} +16 -14
- package/dist/chunks/dashboard-controls-CWwllVOe.cjs +52 -0
- package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-BtU_q_0A.js} +9 -9
- package/dist/chunks/dashboard-json-DVj2xLsH.cjs +1 -0
- package/dist/chunks/edit-dashboard-visual-CO2IVBOq.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-RgFUx-py.js} +1986 -1990
- package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-BE8Fby6n.cjs} +2 -2
- package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-D-MaqTIs.js} +6 -6
- package/dist/chunks/field-aggregations-DUb0NU6c.js +1229 -0
- package/dist/chunks/field-aggregations-jSi77h9Z.cjs +1 -0
- package/dist/chunks/{field-dependencies-DVl2p1Nm.js → field-dependencies-Cl97kkHy.js} +30 -34
- package/dist/chunks/{field-dependencies-r_U0CGQ-.cjs → field-dependencies-DIab72rQ.cjs} +1 -1
- package/dist/chunks/{index-BVr4fcCB.js → index-0pdaQ9e1.js} +5 -5
- package/dist/chunks/index-BaIrLSBb.cjs +1422 -0
- package/dist/chunks/{index-De2QNsqV.js → index-ByiS9sB4.js} +45343 -43665
- package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
- package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
- package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
- package/dist/chunks/{matrix-card-DACDwdTq.js → matrix-card-CnKQpnsj.js} +1 -1
- package/dist/chunks/{matrix-card-CRXcmAjp.cjs → matrix-card-U4c72doZ.cjs} +1 -1
- package/dist/chunks/{matrix-control-sources-ClQzIk7E.js → matrix-control-sources-CRRdP03Q.js} +165 -134
- package/dist/chunks/matrix-control-sources-FjxGIbqk.cjs +1 -0
- package/dist/chunks/{matrix-formatter-7GLTcBuy.cjs → matrix-formatter-CveLJo6S.cjs} +1 -1
- package/dist/chunks/{matrix-formatter-xsq7n_e6.js → matrix-formatter-ZVS5QOuq.js} +2 -2
- package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +1 -0
- package/dist/chunks/matrix-member-presentation-CzGZJd3a.js +182 -0
- package/dist/chunks/matrix-operation-contract-DoiWTUbT.cjs +1 -0
- package/dist/chunks/matrix-operation-contract-xL8IhFzp.js +1802 -0
- package/dist/chunks/{pivot-header-presentation-3wqWChFd.cjs → pivot-header-presentation-Cxz8-06f.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-D44ODZGn.js → pivot-header-presentation-DVylCBHB.js} +2 -2
- package/dist/chunks/{pivot-result-lifecycle-DZ0ZSMoM.cjs → pivot-result-lifecycle-BiERyXnS.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-BSmqVkVG.js → pivot-result-lifecycle-CmjpW7qG.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-xADifRXs.js → report-preferences-dialog-BbkXcnnn.js} +4 -4
- package/dist/chunks/report-preferences-dialog-C9rpWgQZ.cjs +1 -0
- package/dist/chunks/{search-BHsQIWBV.js → selection-reducer-B94WgZ9V.js} +55 -11
- package/dist/chunks/selection-reducer-CGKKsaPa.cjs +26 -0
- package/dist/chunks/{semantic-format-BhIL1PXP.cjs → semantic-format-BzH69TRq.cjs} +1 -1
- package/dist/chunks/{semantic-format-C3amkGmY.js → semantic-format-CBlRO8Aw.js} +1 -1
- package/dist/chunks/{switch-DHGiC0aU.js → switch-CD4uGTZI.js} +7450 -7694
- package/dist/chunks/switch-iC1x2dcE.cjs +134 -0
- package/dist/chunks/token-types-Ahh5u4iT.cjs +1 -0
- package/dist/chunks/token-types-CPde8_LG.js +8 -0
- package/dist/chunks/{update-policy-Cc9h57pA.cjs → update-policy-COjFudhl.cjs} +1 -1
- package/dist/chunks/{update-policy-eTcz52jO.js → update-policy-D9q1Tz8k.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +734 -622
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +3 -3
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +94 -92
- package/dist/data-app-codegen-node/index.js +337 -333
- package/dist/data-app-sdk/index.cjs +9 -9
- package/dist/data-app-sdk/index.js +1091 -969
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +104 -96
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +8 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -15
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/brand-studio/brand-studio-draft.d.ts +3 -1
- package/dist/types/components/dashboard/card-selection-pill.d.ts +5 -0
- package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
- package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -0
- package/dist/types/components/dashboard/drill-navigation-controls.d.ts +3 -3
- package/dist/types/components/interactions/applied-filters-display.d.ts +6 -1
- package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +21 -0
- package/dist/types/components/interactions/dashboard-drill-host.d.ts +13 -0
- package/dist/types/components/interactions/filter-badge-tooltip.d.ts +4 -4
- package/dist/types/components/interactions/insight-modal.d.ts +4 -14
- package/dist/types/components/interactions/insight-viewer.d.ts +7 -19
- package/dist/types/components/interactions/interactions-sheet.d.ts +6 -0
- package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +20 -0
- package/dist/types/components/interactions/reusable/interaction-selection-popover.d.ts +2 -2
- package/dist/types/components/interactions/sheet/action-editor.d.ts +17 -0
- package/dist/types/components/interactions/sheet/action-meta.d.ts +45 -0
- package/dist/types/components/interactions/sheet/action-picker.d.ts +7 -0
- package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +10 -0
- package/dist/types/components/interactions/sheet/interactions-home.d.ts +28 -0
- package/dist/types/components/interactions/sheet/sheet-parts.d.ts +37 -0
- package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +28 -1
- package/dist/types/components/surfboard/filter/selection-chip.d.ts +11 -0
- package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +4 -0
- package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +3 -0
- package/dist/types/components/ui/resizable.d.ts +1 -1
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +13 -1
- package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
- package/dist/types/data-app-sdk/adapters.d.ts +3 -2
- package/dist/types/data-app-sdk/builders.d.ts +2 -1
- package/dist/types/data-app-sdk/contracts.d.ts +44 -2
- package/dist/types/data-app-sdk/index.d.ts +1 -0
- package/dist/types/data-app-sdk/query-request.d.ts +7 -2
- package/dist/types/data-app-sdk/selection.d.ts +2 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +24 -23
- package/dist/types/lib/appearance/types.d.ts +3 -1
- package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
- package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
- package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
- package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
- package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
- package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
- package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
- package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
- package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
- package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
- package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
- package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
- package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
- package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
- package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
- package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
- package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
- package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
- package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
- package/dist/types/lib/download-pdf.d.ts +0 -3
- package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
- package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
- package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
- package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
- package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
- package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
- package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
- package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
- package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
- package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
- package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
- package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
- package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
- package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
- package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
- package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
- package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
- package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
- package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
- package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
- package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/selection/selection-labels.d.ts +3 -0
- package/dist/types/lib/selection/selection-notices.d.ts +9 -0
- package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
- package/dist/types/lib/stores/editor-store.d.ts +1 -2
- package/dist/types/lib/stores/index.d.ts +0 -2
- package/dist/types/lib/types/common-types.d.ts +60 -6
- package/dist/types/lib/types/explorer-types.d.ts +1 -22
- package/dist/types/lib/types/interaction-types.d.ts +6 -198
- package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
- package/dist/types/lib/utils/card-utils.d.ts +11 -0
- package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
- package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
- package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
- package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
- package/package.json +1 -1
- package/src/data-app-sdk/README.md +58 -1
- package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
- package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
- package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
- package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
- package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
- package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
- package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
- package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
- package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
- package/dist/chunks/index-C8XCKzB6.cjs +0 -1
- package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
- package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
- package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
- package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
- package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
- package/dist/chunks/search-BqqhaMx9.cjs +0 -26
- package/dist/chunks/switch-BytP6QY8.cjs +0 -139
- package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
- package/dist/types/components/interactions/interaction-card.d.ts +0 -59
- package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
- package/dist/types/components/interactions/interactions-list.d.ts +0 -50
- package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
- package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
- package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
- package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
- package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
- package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
- package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
- package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
- package/dist/types/lib/interactions/field-utils.d.ts +0 -11
- package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
- package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
- package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
- package/dist/types/lib/stores/drill-actions.d.ts +0 -139
- package/dist/types/lib/stores/interaction-store.d.ts +0 -113
- package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CardDrillPath } from '../dashboard-view-state/index.js';
|
|
2
|
+
import { CardConfig, FilterGroup } from '../types/explorer-types.js';
|
|
3
|
+
import { TCard } from '../types/common-types.js';
|
|
4
|
+
import { SelectionFilterSource } from './compile-selection-filters.js';
|
|
5
|
+
/**
|
|
6
|
+
* Combines a card's authored filters, its drill path and the selections that
|
|
7
|
+
* narrow it into one merged FilterGroup. A selection carried by a
|
|
8
|
+
* drill-through or into an insight arrives here like any other: the input
|
|
9
|
+
* resolver has already resolved it for this card.
|
|
10
|
+
*
|
|
11
|
+
* Filter combination logic:
|
|
12
|
+
* - Inside a filter group (group.filters): AND
|
|
13
|
+
* - Between drill steps: AND
|
|
14
|
+
* - Within a selection: AND inside a tuple, OR across tuples, AND across source cards
|
|
15
|
+
* - Between authored filters, the drill path, and selections: AND
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveRuntimeCardFilters(card: TCard, options?: {
|
|
18
|
+
includeAuthoredFilters?: boolean;
|
|
19
|
+
/** Other cards' selections, already resolved for this card. */
|
|
20
|
+
selections?: SelectionFilterSource[];
|
|
21
|
+
/** This card's drill path, from card view state. */
|
|
22
|
+
drill?: CardDrillPath;
|
|
23
|
+
}): FilterGroup | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The configuration a card runs with: grouped at its current drill level, with
|
|
26
|
+
* the resolved runtime filters. Validated here so every consumer (queries,
|
|
27
|
+
* exports, and so on) gets a valid comparison configuration.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveRuntimeCardConfig(card: TCard, drill: CardDrillPath | undefined, resolvedFilters: FilterGroup | undefined): CardConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TCard } from '../types/common-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Card types that get the new click-to-filter authoring: the fields rule, the
|
|
4
|
+
* Matrix sources, Review cards and its field mapping. The aggregate table and
|
|
5
|
+
* the legacy pivot are legacy producers. Their clicks still filter, and an
|
|
6
|
+
* author can still turn that on or off and set the receiver flag, but they get
|
|
7
|
+
* none of the new options.
|
|
8
|
+
*/
|
|
9
|
+
export declare function supportsClickToFilterAuthoring(type: TCard['type']): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SelectionTuple } from '../../shared/analytics-protocol/selection-contract.js';
|
|
2
|
+
import { ClickToFilterSettings } from '../../shared/dashboard-authoring/click-to-filter-settings.js';
|
|
3
|
+
import { DashboardCardFilterSourceInventory } from '../../shared/dashboard-authoring/dashboard-card-source-index.js';
|
|
4
|
+
import { Field } from '../types/explorer-types.js';
|
|
5
|
+
import { ClickFilterCondition } from '../types/interaction-types.js';
|
|
6
|
+
export type SelectionTupleUnavailableReason =
|
|
7
|
+
/** The click carried no dimension value (a total, a blank area). */
|
|
8
|
+
'noFields'
|
|
9
|
+
/** The fields rule needs the clicked column and it is not a filterable dimension. */
|
|
10
|
+
| 'clickedColumnNotFilterable'
|
|
11
|
+
/** None of the clicked fields are among the author's chosen columns. */
|
|
12
|
+
| 'noChosenColumns'
|
|
13
|
+
/** A field is calculated, or is not on a source this card executes. */
|
|
14
|
+
| 'fieldNotFilterable'
|
|
15
|
+
/** The builder produced a condition that is not an equality or a blank. */
|
|
16
|
+
| 'unsupportedCondition';
|
|
17
|
+
export type SelectionTupleResult = {
|
|
18
|
+
status: 'ready';
|
|
19
|
+
tuple: SelectionTuple;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'unavailable';
|
|
22
|
+
code: SelectionTupleUnavailableReason;
|
|
23
|
+
/** Viewer-facing; shown as a tooltip on the source. */
|
|
24
|
+
reason: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Turns a click-context builder's output into one selection tuple: applies the
|
|
28
|
+
* card's fields rule, drops measures, and grounds every explorer field on one
|
|
29
|
+
* of the source card's own executable sources. One ungroundable condition
|
|
30
|
+
* makes the whole tuple unavailable, because a partial tuple would filter to
|
|
31
|
+
* more than the viewer clicked.
|
|
32
|
+
*/
|
|
33
|
+
export declare function selectionTupleFromClickContext(params: {
|
|
34
|
+
settings: Pick<ClickToFilterSettings, 'fields'>;
|
|
35
|
+
/** Builder output. */
|
|
36
|
+
conditions: ClickFilterCondition[];
|
|
37
|
+
/** The dimension column under the pointer; required for 'clickedCell'. */
|
|
38
|
+
clickedField?: Field;
|
|
39
|
+
/** buildDashboardCardSourceIndex(card) of the source card. */
|
|
40
|
+
sourceIndex: DashboardCardFilterSourceInventory;
|
|
41
|
+
}): SelectionTupleResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SelectionTupleResult } from './selection-from-click-context.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tells the viewer why a click did not filter. A click on a column that simply
|
|
4
|
+
* is not a filter column stays silent: it is the ordinary case on a
|
|
5
|
+
* clicked-cell table, not a problem to report.
|
|
6
|
+
*/
|
|
7
|
+
export declare function notifySelectionUnavailable(result: Extract<SelectionTupleResult, {
|
|
8
|
+
status: 'unavailable';
|
|
9
|
+
}>): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SelectionTuple } from '../../shared/analytics-protocol/selection-contract.js';
|
|
2
|
+
export type SelectionGesture<TTuple = SelectionTuple> =
|
|
3
|
+
/** Plain click. */
|
|
4
|
+
{
|
|
5
|
+
kind: 'replace';
|
|
6
|
+
}
|
|
7
|
+
/** Cmd/Ctrl-click; Shift-click on charts and matrix; tap when checkboxes are shown. */
|
|
8
|
+
| {
|
|
9
|
+
kind: 'toggle';
|
|
10
|
+
}
|
|
11
|
+
/** Shift-click on tables. `ordered` is the visible row order after sort and filter. */
|
|
12
|
+
| {
|
|
13
|
+
kind: 'range';
|
|
14
|
+
anchor: TTuple;
|
|
15
|
+
ordered: TTuple[];
|
|
16
|
+
}
|
|
17
|
+
/** Esc, blank plot area, chip dismiss, card Clear. */
|
|
18
|
+
| {
|
|
19
|
+
kind: 'clear';
|
|
20
|
+
};
|
|
21
|
+
export type SelectionReduceResult<TTuple = SelectionTuple> = {
|
|
22
|
+
tuples: TTuple[];
|
|
23
|
+
outcome: 'selected' | 'added' | 'removed' | 'cleared' | 'rangeSelected' | 'limitReached';
|
|
24
|
+
};
|
|
25
|
+
/** Pure selection state transition. `incoming` is ignored by `clear`. */
|
|
26
|
+
export declare function reduceSelection(current: SelectionTuple[], incoming: SelectionTuple, gesture: SelectionGesture<SelectionTuple>, options: {
|
|
27
|
+
multipleSelection: boolean;
|
|
28
|
+
limit?: number;
|
|
29
|
+
}): SelectionReduceResult<SelectionTuple>;
|
|
30
|
+
export declare function reduceSelection<TTuple>(current: TTuple[], incoming: TTuple, gesture: SelectionGesture<TTuple>, options: {
|
|
31
|
+
multipleSelection: boolean;
|
|
32
|
+
limit?: number;
|
|
33
|
+
tupleKey: (tuple: TTuple) => string;
|
|
34
|
+
}): SelectionReduceResult<TTuple>;
|
|
35
|
+
/** What the pointer asked for. A range still needs the anchor and the visible row order, which the caller owns. */
|
|
36
|
+
export type SelectionGestureIntent = 'replace' | 'toggle' | 'range';
|
|
37
|
+
export declare function gestureFromPointer(event: {
|
|
38
|
+
shiftKey: boolean;
|
|
39
|
+
metaKey: boolean;
|
|
40
|
+
ctrlKey: boolean;
|
|
41
|
+
pointerType?: string;
|
|
42
|
+
}, visual: 'table' | 'chart' | 'matrix', options: {
|
|
43
|
+
multipleSelection: boolean;
|
|
44
|
+
hasAnchor: boolean;
|
|
45
|
+
checkboxesShown: boolean;
|
|
46
|
+
}): SelectionGestureIntent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthToken, TBaseQuery, Breakpoint, ControlDefinition, CustomCard, StyleProps, TCard, TDashboard, TEvent, TFrame, TSheet, TStyle, AIScopeTable, TLens, CacheConfig, EmailSettings, FilterLayoutSettings, DocumentDefinition, DashboardInput, DashboardInputSlot, DashboardInputValues, DashboardLifecycleEvent } from '../types/common-types.js';
|
|
2
2
|
import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
|
|
4
4
|
import { default as ReactGridLayout } from 'react-grid-layout';
|
|
5
5
|
import { DashboardAIContext } from '../types/assistant-types.js';
|
|
6
6
|
import { FilterGroup, Field } from '../types/explorer-types.js';
|
|
@@ -14,6 +14,8 @@ import { DashboardFilterAuthoringSettingsUpdate } from '../dashboard-inputs/dash
|
|
|
14
14
|
import { GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
|
|
15
15
|
import { CalendarPreferencesResponse, ReportRuntimeContext, ResolvedCalendarPreferenceSources } from '../../shared/report-runtime-context/index.js';
|
|
16
16
|
import { ResolvedValueFormatPreferenceSources, ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
|
|
17
|
+
import { DashboardNavigationEntry, DashboardNavigationState, DashboardTransientContextScope, InsightRenderRequest, NavigationRejection } from '../dashboard-navigation/index.js';
|
|
18
|
+
import { CardViewStateMap, DrillStep } from '../dashboard-view-state/index.js';
|
|
17
19
|
type AddFrameOptions = {
|
|
18
20
|
position?: 'start' | 'end';
|
|
19
21
|
insertAfterFrameId?: string;
|
|
@@ -93,25 +95,38 @@ export type DashboardStore = {
|
|
|
93
95
|
cardControlValuesMap: Record<string, Record<string, unknown>>;
|
|
94
96
|
/** Runtime-only dashboard input values keyed by input runtime scope. */
|
|
95
97
|
dashboardInputValues: DashboardInputValues;
|
|
98
|
+
/** Session-only per-card view state (the drill path), keyed by cardId. Never persisted. */
|
|
99
|
+
cardViewState: CardViewStateMap;
|
|
96
100
|
/** Fixed execution clock from a strict dashboard input replay snapshot. */
|
|
97
101
|
dashboardInputReferenceTime?: string;
|
|
98
102
|
semanticExecutionPayload: SemanticExecutionPayload;
|
|
99
103
|
reportContext: ReportRuntimeContext | null;
|
|
100
104
|
/** Access-token session that owns the hydrated report context. */
|
|
101
105
|
reportContextSessionAccessToken: string | null;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Drill-through history, the dashboard navigation points at, and open
|
|
108
|
+
* insights. Session only.
|
|
109
|
+
*/
|
|
110
|
+
navigationStack: DashboardNavigationState['navigationStack'];
|
|
111
|
+
navigationTarget: DashboardNavigationState['navigationTarget'];
|
|
112
|
+
insightRenderRequests: DashboardNavigationState['insightRenderRequests'];
|
|
113
|
+
/**
|
|
114
|
+
* Carried contexts restored from an execution snapshot (print, embed), for
|
|
115
|
+
* the dashboard that snapshot renders. Null in a live session, where the
|
|
116
|
+
* navigation stack decides. Read through `selectEffectiveTransientContexts`.
|
|
117
|
+
*/
|
|
118
|
+
restoredTransientContextScope: DashboardTransientContextScope | null;
|
|
119
|
+
/**
|
|
120
|
+
* Context kept for the dashboard being left until dashboard selection
|
|
121
|
+
* catches up with `navigationTarget`. Null outside that short handoff.
|
|
122
|
+
*/
|
|
123
|
+
outgoingTransientContextScope: DashboardTransientContextScope | null;
|
|
124
|
+
/**
|
|
125
|
+
* A drill-through the viewer asked for, built at the click, waiting for its
|
|
126
|
+
* destination to load. It becomes a navigation entry only then, so the
|
|
127
|
+
* dashboard being left keeps its own carried context until it goes away.
|
|
128
|
+
*/
|
|
129
|
+
pendingDrillThrough: DashboardNavigationEntry | null;
|
|
115
130
|
onEvent?: (event: TEvent) => void;
|
|
116
131
|
onDashboardLifecycleEvent?: (event: DashboardLifecycleEvent) => void;
|
|
117
132
|
onSaveFunction?: (dashboard: TDashboard, description?: string) => void;
|
|
@@ -156,6 +171,12 @@ type Actions = {
|
|
|
156
171
|
resetDashboardInputComparisonSelection: (input: Pick<DashboardInput, 'id' | 'runtimeScope'>, target: DashboardInputRuntimeTarget) => void;
|
|
157
172
|
clearDashboardInputSlot: (input: Pick<DashboardInput, 'id' | 'runtimeScope'>, target: DashboardInputRuntimeTarget) => void;
|
|
158
173
|
removeDashboardInputSlot: (input: Pick<DashboardInput, 'id' | 'runtimeScope'>, target: DashboardInputRuntimeTarget) => void;
|
|
174
|
+
/** Drills one level into a card. `hierarchyId` is set for an authored hierarchy. */
|
|
175
|
+
pushDrillStep: (cardId: string, step: DrillStep, hierarchyId?: string) => void;
|
|
176
|
+
/** Drills one level back up. */
|
|
177
|
+
popDrillStep: (cardId: string) => void;
|
|
178
|
+
resetCardViewState: (cardId: string) => void;
|
|
179
|
+
resetAllCardViewState: () => void;
|
|
159
180
|
setDashboardControlsModel: (controls: ControlDefinition[], defaultValues?: Record<string, unknown>, options?: DashboardControlsModelOptions) => void;
|
|
160
181
|
updateDashboardControl: (controlId: string, updates: Partial<ControlDefinition>) => void;
|
|
161
182
|
reorderDashboardControls: (orderedControlIds: string[]) => void;
|
|
@@ -186,6 +207,9 @@ type Actions = {
|
|
|
186
207
|
semanticExecutionPayload?: SemanticExecutionPayload;
|
|
187
208
|
dashboardInputValues?: DashboardInputValues;
|
|
188
209
|
dashboardInputReferenceTime?: string;
|
|
210
|
+
/** Drill paths replayed from an execution snapshot. */
|
|
211
|
+
cardViewState?: CardViewStateMap;
|
|
212
|
+
transientContexts?: TransientInputContext[];
|
|
189
213
|
reportContext?: ReportRuntimeContext;
|
|
190
214
|
authToken?: AuthToken;
|
|
191
215
|
}) => void;
|
|
@@ -302,9 +326,30 @@ type Actions = {
|
|
|
302
326
|
error?: string;
|
|
303
327
|
};
|
|
304
328
|
isCardIdUnique: (cardId: string, currentCardId?: string) => boolean;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
329
|
+
/**
|
|
330
|
+
* Holds a drill-through until its destination has loaded; see
|
|
331
|
+
* `pendingDrillThrough`. The dashboard drill host completes it with
|
|
332
|
+
* `navigateToDashboard`, or cancels it when the destination cannot load.
|
|
333
|
+
*/
|
|
334
|
+
requestDrillThrough: (entry: DashboardNavigationEntry) => void;
|
|
335
|
+
cancelDrillThrough: () => void;
|
|
336
|
+
/**
|
|
337
|
+
* Drill through: pushes the entry, points navigation at its destination and
|
|
338
|
+
* closes open insights, as one transition. A rejected entry changes nothing.
|
|
339
|
+
*/
|
|
340
|
+
navigateToDashboard: (entry: DashboardNavigationEntry) => {
|
|
341
|
+
success: true;
|
|
342
|
+
} | {
|
|
343
|
+
success: false;
|
|
344
|
+
reason: NavigationRejection;
|
|
345
|
+
};
|
|
346
|
+
/** One step back, as one transition. Returns false at the root. */
|
|
347
|
+
goBack: () => boolean;
|
|
348
|
+
/** Forgets the drill history and stays on the current dashboard. */
|
|
349
|
+
clearNavigation: () => void;
|
|
350
|
+
openInsightRequest: (request: InsightRenderRequest) => void;
|
|
351
|
+
closeInsightRequest: (sourceCardId: string) => void;
|
|
352
|
+
closeAllInsightRequests: () => void;
|
|
308
353
|
};
|
|
309
354
|
export declare const useDashboardStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<DashboardStore>, "setState"> & {
|
|
310
355
|
setState(nextStateOrUpdater: DashboardStore | Partial<DashboardStore> | ((state: import('immer').WritableDraft<DashboardStore>) => void), shouldReplace?: false): void;
|
|
@@ -6,7 +6,6 @@ import { FilterByColumn, OldFilterValue, GroupByColumn, MetricColumn, OrderBy, Q
|
|
|
6
6
|
import { TableActions } from './table-actions.js';
|
|
7
7
|
import { CardConfig, QueryColumnKeyMap } from '../types/explorer-types.js';
|
|
8
8
|
import { ExplorerActions } from './explorer-actions.js';
|
|
9
|
-
import { DrillActions } from './drill-actions.js';
|
|
10
9
|
/**
|
|
11
10
|
* Draft slots for preserving work when switching between dev and standard modes.
|
|
12
11
|
* When user switches FROM a mode, the current work is saved to that mode's draft slot.
|
|
@@ -97,7 +96,7 @@ export type EditorStore = {
|
|
|
97
96
|
/** Draft slots for mode switching - preserves work when toggling between dev/standard */
|
|
98
97
|
modeDrafts: ModeDrafts;
|
|
99
98
|
};
|
|
100
|
-
type Actions = TableActions & ExplorerActions &
|
|
99
|
+
type Actions = TableActions & ExplorerActions & {
|
|
101
100
|
/** Resets the editor store to its initial state. Called when loading a new dashboard. */
|
|
102
101
|
resetEditorStore: () => void;
|
|
103
102
|
setEditorFilterMode: (filterColumnName: string, filterMode: 'include' | 'exclude') => void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export { useInteractionStore, useResolvedCardConfig, useClickFiltersForCard, createInitialInteractionState, } from './interaction-store.js';
|
|
2
1
|
export { useChartJSStore } from './chartjs-store.js';
|
|
3
2
|
export { useDashboardStore } from './dashboard-store.js';
|
|
4
|
-
export { usePointerInteractionStore } from './pointer-interaction-store.js';
|
|
5
3
|
export { useEditorStore, useEditorActions } from './editor-store.js';
|
|
6
4
|
export { useAssistantLayoutStore, useAssistantPanel, useFullscreenAssistant, useAssistantContainer, } from './assistant-layout-store.js';
|
|
7
5
|
export { useAIInteractionStore, useCurrentAIContext, useAISelectedEntities, useAIActions, } from './ai-interaction-store.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CardViewStateMap } from '../dashboard-view-state/index.js';
|
|
1
2
|
import { TFilter, TFilterValue, Operation, TCustomFilterPreferences, DateSelectionMode, DefaultDateFilter, FilterFieldMeta, FilterSemanticContext } from '../../components/surfboard/filter/types.js';
|
|
2
3
|
import { FontSpec } from 'chart.js';
|
|
3
4
|
import { TChartType } from '../charts/types.js';
|
|
@@ -6,13 +7,18 @@ import { TablePreferences } from '../../components/visual/data-table/types/data-
|
|
|
6
7
|
import { CalculatedFieldFormula, CardConfig, Field, FormatSpec, AggregateFunction, GroupByField, MetricField, PaginationConfig, DateFormatValue, EntityType, TimeGranularity, DataSource } from './explorer-types.js';
|
|
7
8
|
import { ComparisonPresentationSpec, GlobalDateComparisonSelection, MetricComparisonPolarity, SemaphorDerivedFieldDefinition, TemporalBucketFormat } from '../../shared/analytics-protocol/index.js';
|
|
8
9
|
import { DashboardFilterApplication, DashboardFilterOptionSource, DashboardFilterOptionDependencies, DashboardFilterOptionPopulation } from '../../shared/dashboard-authoring/dashboard-filter-mapping-types.js';
|
|
10
|
+
import { ClickToFilterSettings, LinkedClickToFilterOverrides } from '../../shared/dashboard-authoring/click-to-filter-settings.js';
|
|
11
|
+
import { SelectionInputValue } from '../../shared/analytics-protocol/selection-contract.js';
|
|
12
|
+
import { ResolvedCardSelection } from '../dashboard-inputs/resolve-selection-input.js';
|
|
13
|
+
import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
|
|
9
14
|
import { DashboardAIContext } from './assistant-types.js';
|
|
10
|
-
import { CardInteractionConfig,
|
|
15
|
+
import { CardInteractionConfig, InteractionTargetOverride } from './interaction-types.js';
|
|
11
16
|
import { SemanticExecutionPayload } from './semantic-runtime-types.js';
|
|
12
17
|
import { ReportRuntimeContext } from '../../shared/report-runtime-context/index.js';
|
|
13
18
|
import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
|
|
14
19
|
import { JSX } from 'react';
|
|
15
20
|
export type { DashboardFilterApplication, DashboardFilterBoundCardApplication, DashboardFilterCardApplication, DashboardFilterExcludedCardApplication, DashboardFilterTarget, DashboardFilterTargetField, DashboardFilterTargetSource, DashboardFilterOptionSource, } from '../../shared/dashboard-authoring/dashboard-filter-mapping-types.js';
|
|
21
|
+
export type { ClickToFilterCardMapping, ClickToFilterFieldsRule, ClickToFilterMatrixSources, ClickToFilterSettings, LinkedClickToFilterOverrides, } from '../../shared/dashboard-authoring/click-to-filter-settings.js';
|
|
16
22
|
export type Level = 'database' | 'schema' | 'table';
|
|
17
23
|
export type SelectionState = Record<Level, string | null>;
|
|
18
24
|
export declare const EMPTY_SELECTION: SelectionState;
|
|
@@ -253,11 +259,6 @@ export type DashboardProps = {
|
|
|
253
259
|
* inputs instead of documentInputValues.
|
|
254
260
|
*/
|
|
255
261
|
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
256
|
-
/**
|
|
257
|
-
* Runtime interaction state captured for deterministic print/replay entry
|
|
258
|
-
* points. Ordinary dashboard consumers should leave this unset.
|
|
259
|
-
*/
|
|
260
|
-
interactionExecutionSnapshot?: Record<string, InteractionState>;
|
|
261
262
|
/** Server-resolved immutable presentation snapshot for internal print views. */
|
|
262
263
|
presentationExecutionSnapshot?: PresentationExecutionSnapshot;
|
|
263
264
|
/**
|
|
@@ -1044,12 +1045,37 @@ export type NormalizedFilterDashboardInput = FilterDashboardInputBase & {
|
|
|
1044
1045
|
optionDependencies?: DashboardFilterOptionDependencies;
|
|
1045
1046
|
optionPopulation?: DashboardFilterOptionPopulation;
|
|
1046
1047
|
application?: DashboardFilterApplication;
|
|
1048
|
+
/**
|
|
1049
|
+
* Runtime-only policy for synthesized inputs whose predicate must never be
|
|
1050
|
+
* sent to a SQL card without an explicit, validated binding, and must never
|
|
1051
|
+
* block a card: a target it cannot use (ambiguous, incompatible, stale)
|
|
1052
|
+
* drops the predicate for that card, because no author of this dashboard
|
|
1053
|
+
* could repair it. Authored inputs omit it and keep the existing SQL Auto and
|
|
1054
|
+
* blocking behavior.
|
|
1055
|
+
*/
|
|
1056
|
+
unmappedTargetPolicy?: 'requireFieldProof';
|
|
1047
1057
|
definitionOrigin: 'embedded' | 'dashboardFilter';
|
|
1048
1058
|
};
|
|
1049
1059
|
export type ControlDashboardInput = DashboardInputBase & {
|
|
1050
1060
|
kind: 'control';
|
|
1051
1061
|
control: ControlDefinition;
|
|
1052
1062
|
};
|
|
1063
|
+
/**
|
|
1064
|
+
* Synthesized per enabled source card at runtime; never persisted and not a
|
|
1065
|
+
* member of `DashboardInput`. It is deliberately not a member of
|
|
1066
|
+
* `NormalizedDashboardInput` either: that union feeds aliases, exports, toolbar
|
|
1067
|
+
* controls and authored defaults, none of which a selection has. Selection
|
|
1068
|
+
* inputs travel on their own typed list (`buildSelectionDashboardInputs`), so
|
|
1069
|
+
* no consumer can read one as a control.
|
|
1070
|
+
* Base fields: id = selectionInputId(cardId), label = card title,
|
|
1071
|
+
* variableName = `selection_${cardId}`, scope = settings.targets,
|
|
1072
|
+
* runtimeScope = 'shared', presentation hidden.
|
|
1073
|
+
*/
|
|
1074
|
+
export type SelectionDashboardInput = DashboardInputBase & {
|
|
1075
|
+
kind: 'selection';
|
|
1076
|
+
sourceCardId: string;
|
|
1077
|
+
settings: ClickToFilterSettings;
|
|
1078
|
+
};
|
|
1053
1079
|
export type NormalizedDashboardInput = NormalizedFilterDashboardInput | ControlDashboardInput;
|
|
1054
1080
|
export type DashboardInputValue = {
|
|
1055
1081
|
kind: 'filter';
|
|
@@ -1057,6 +1083,9 @@ export type DashboardInputValue = {
|
|
|
1057
1083
|
} | {
|
|
1058
1084
|
kind: 'control';
|
|
1059
1085
|
value: unknown;
|
|
1086
|
+
} | {
|
|
1087
|
+
kind: 'selection';
|
|
1088
|
+
selection: SelectionInputValue;
|
|
1060
1089
|
};
|
|
1061
1090
|
export type DashboardInputSlot = {
|
|
1062
1091
|
status: 'set';
|
|
@@ -1130,6 +1159,8 @@ export type ResolvedDashboardInputContext = {
|
|
|
1130
1159
|
dateComparisonInputs?: ResolvedDashboardDateComparisonInput[];
|
|
1131
1160
|
variablesById: Record<string, ResolvedDashboardInput>;
|
|
1132
1161
|
missingRequiredInputs: ResolvedDashboardInput[];
|
|
1162
|
+
/** Other cards' selections, resolved for this card. Empty without a card. */
|
|
1163
|
+
selections: ResolvedCardSelection[];
|
|
1133
1164
|
};
|
|
1134
1165
|
export type DashboardInputVariableRef = {
|
|
1135
1166
|
source: 'dashboardInput';
|
|
@@ -1196,6 +1227,19 @@ export type DashboardInputExecutionSnapshot = {
|
|
|
1196
1227
|
cardId?: string;
|
|
1197
1228
|
mode: 'dashboard' | 'document' | 'visual';
|
|
1198
1229
|
dashboardInputValues: DashboardInputValues;
|
|
1230
|
+
/**
|
|
1231
|
+
* Drill paths by card, so an export shows each card at the level the viewer
|
|
1232
|
+
* was looking at. Present only when a card is drilled.
|
|
1233
|
+
*/
|
|
1234
|
+
cardViewState?: CardViewStateMap;
|
|
1235
|
+
/**
|
|
1236
|
+
* Contexts carried to the rendered dashboard by a drill-through: hidden
|
|
1237
|
+
* definitions plus their values, under their own namespace. Their context
|
|
1238
|
+
* mode decides whether the dashboard's own toolbar filters apply, so the
|
|
1239
|
+
* replay reads the mode from here rather than from a second field. The
|
|
1240
|
+
* navigation history is not captured. Present only after a drill-through.
|
|
1241
|
+
*/
|
|
1242
|
+
transientContexts?: TransientInputContext[];
|
|
1199
1243
|
generatedAt?: string;
|
|
1200
1244
|
timezone?: string;
|
|
1201
1245
|
};
|
|
@@ -1226,6 +1270,12 @@ export type TCard = {
|
|
|
1226
1270
|
linkedSourceCardId?: string;
|
|
1227
1271
|
linkedReferenceOverrides?: DashboardCardReferenceRemapping;
|
|
1228
1272
|
linkedInteractionTargetOverrides?: Record<string, InteractionTargetOverride>;
|
|
1273
|
+
/** Author settings for click to filter. Absent means "derive from legacy interactions or defaults". */
|
|
1274
|
+
clickToFilter?: ClickToFilterSettings;
|
|
1275
|
+
/** Receiver side. false = this card ignores selections from every source card. Default true. */
|
|
1276
|
+
respondsToSelections?: boolean;
|
|
1277
|
+
/** Instance-level click-to-filter overrides for a linked library visual. */
|
|
1278
|
+
linkedClickToFilterOverrides?: LinkedClickToFilterOverrides;
|
|
1229
1279
|
paginationConfig?: PaginationConfig;
|
|
1230
1280
|
queryConfig?: QueryConfig;
|
|
1231
1281
|
customCfg?: any;
|
|
@@ -1527,6 +1577,10 @@ export type EmailSettings = {
|
|
|
1527
1577
|
export type TDashboard = {
|
|
1528
1578
|
id: string;
|
|
1529
1579
|
title?: string;
|
|
1580
|
+
interactionDefaults?: {
|
|
1581
|
+
/** Dashboard creation sets 'on'. Absent resolves to 'off', so existing dashboards do not change. */
|
|
1582
|
+
clickToFilter: 'on' | 'off';
|
|
1583
|
+
};
|
|
1530
1584
|
aiContext?: DashboardAIContext;
|
|
1531
1585
|
summary?: {
|
|
1532
1586
|
enabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TimeDrillStep } from './interaction-types.js';
|
|
2
2
|
import { SemaphorDerivedFieldDefinition, MatrixConfig, SemaphorSourceRef, SemaphorResultColumn, SemaphorPivotValue, SemaphorTimeGrain, SemanticGroupedTemporalInput, TemporalBucketMetadata, TemporalBucketFormat, MetricComparisonConfig, MetricComparisonPolarity } from '../../shared/analytics-protocol/index.js';
|
|
3
3
|
import { CanonicalPivotResultContract, CanonicalPivotResultState, FlatTableExportTotalsBehavior, FlatTableExportTotalsRequest, QueryColumnKeyMap as SharedQueryColumnKeyMap } from '../../shared/format-utils/index.js';
|
|
4
4
|
import { TemporalResultOwner } from '../../shared/dashboard-authoring/index.js';
|
|
@@ -619,27 +619,6 @@ export interface CardConfig {
|
|
|
619
619
|
filters?: FilterGroup;
|
|
620
620
|
joinPlan?: JoinPlan;
|
|
621
621
|
rowLimit?: number;
|
|
622
|
-
/**
|
|
623
|
-
* One or more hierarchies that define drillable paths through dimensions.
|
|
624
|
-
*/
|
|
625
|
-
drillHierarchies?: DrillHierarchy[];
|
|
626
|
-
/**
|
|
627
|
-
* Optional list of dimensions allowed for dynamic drill-down across this card.
|
|
628
|
-
* Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
|
|
629
|
-
*/
|
|
630
|
-
allowedDrillTargets?: Field[];
|
|
631
|
-
/**
|
|
632
|
-
* NOT UOptional preload settings for inline drill previews
|
|
633
|
-
*/
|
|
634
|
-
inlineDrillPreview?: {
|
|
635
|
-
enabled: boolean;
|
|
636
|
-
limit: number;
|
|
637
|
-
mode: 'lazy' | 'preloaded';
|
|
638
|
-
};
|
|
639
|
-
/**
|
|
640
|
-
* Configuration for on-click dashboard filters triggered by this card.
|
|
641
|
-
*/
|
|
642
|
-
clickFilterInteractions?: ClickFilterInteraction[];
|
|
643
622
|
summary?: {
|
|
644
623
|
enabled?: boolean;
|
|
645
624
|
showOnCard?: boolean;
|